package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.UsageRecordMapper;
import com.ruoyi.system.domain.UsageRecord;
import com.ruoyi.system.service.IUsageRecordService;

/**
 * 专属权益次数管理Service业务层处理
 *
 * @author ruoyi
 * @date 2024-09-29
 */
@Service
public class UsageRecordServiceImpl implements IUsageRecordService
{
    @Autowired
    private UsageRecordMapper usageRecordMapper;

    /**
     * 查询专属权益次数管理
     *
     * @param id 专属权益次数管理主键
     * @return 专属权益次数管理
     */
    @Override
    public UsageRecord selectUsageRecordById(Long id)
    {
        return usageRecordMapper.selectUsageRecordById(id);
    }

    /**
     * 查询专属权益次数管理列表
     *
     * @param usageRecord 专属权益次数管理
     * @return 专属权益次数管理
     */
    @Override
    public List<UsageRecord> selectUsageRecordList(UsageRecord usageRecord)
    {
        return usageRecordMapper.selectUsageRecordList(usageRecord);
    }

    /**
     * 新增专属权益次数管理
     *
     * @param usageRecord 专属权益次数管理
     * @return 结果
     */
    @Override
    public int insertUsageRecord(UsageRecord usageRecord)
    {
        return usageRecordMapper.insertUsageRecord(usageRecord);
    }

    /**
     * 修改专属权益次数管理
     *
     * @param usageRecord 专属权益次数管理
     * @return 结果
     */
    @Override
    public int updateUsageRecord(UsageRecord usageRecord)
    {
        return usageRecordMapper.updateUsageRecord(usageRecord);
    }

    /**
     * 批量删除专属权益次数管理
     *
     * @param ids 需要删除的专属权益次数管理主键
     * @return 结果
     */
    @Override
    public int deleteUsageRecordByIds(Long[] ids)
    {
        return usageRecordMapper.deleteUsageRecordByIds(ids);
    }

    /**
     * 删除专属权益次数管理信息
     *
     * @param id 专属权益次数管理主键
     * @return 结果
     */
    @Override
    public int deleteUsageRecordById(Long id)
    {
        return usageRecordMapper.deleteUsageRecordById(id);
    }
}
